package com.company.project.common.utils;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 * @Description TODO(title)
 * @Author YangYulin
 * @Email YangYulinIt@136.com
 * @Date 2020/7/13
 * @Time 17:49
 * @Version V1.0.0
 * @ReviseHistory
 * @Title RevisePeople    Version    Edit    ReviseContent
 * @Split --------------------------------------------------------
 * @Column 杨玉林          1.0.0      create
 */
public class Sign {

    public static String encodeFile(byte[] b){
        String result = null;
        try {
            MessageDigest md =MessageDigest.getInstance("MD5");
            result = PasswordEncoder.byteArrayToHexString(md.digest(b));
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
        return result ;
    }
}
